package com.ddxz.tool.core.exception;

import com.ddxz.tool.core.common.DdxzStatus;

/**
 * enum description
 *
 * @author 朱宗刚
 * @version 1.0.0
 * @date 2020/7/27
 */

public enum DdxzErrorStatus implements DdxzStatus {
    CAN_NOT_COPY(9000, "cannot copy from {} to {}"),
    MAX_LESS_MIN(9001, "max must better than min: max: {}, min: {}"),
    INVALID_CHARACTER(9002, "invalid character for sixty two data"),
    ARRAY_LENGTH_ERROR(9003, "cannot copy array from size {} to size {}"),
    CONSTRUCTOR_NOT_FOUND(9004, "no default constructor found"),
    CONVERT_ERROR(9005, "could not convert String to {}"),
    INVALID_VERSION(9006, "get integer version from {} failed"),
    INVALID_TOKEN(9007, "无效的令牌"),
    OBJECT_IS_NULL(9008, "对象为空"),
    LEFT_LT_RIGHT(9009, "小于运算执行结果为假"),
    LEFT_GT_RIGHT(9010, "大于运算执行结果为假"),
    LEFT_EQ_RIGHT(9011, "等于运算执行结果为假"),
    LEFT_UE_RIGHT(9012, "不等于运算执行结果为假"),
    LEFT_LE_RIGHT(9013, "不大于运算执行结果为假"),
    LEFT_GE_RIGHT(9014, "不小于运算执行结果为假"),
    STR_DATE_FAILED(9015, "字符串{}无法转换为日期时间");

    private Integer status;

    private String message;

    DdxzErrorStatus(Integer status, String message) {
        this.status = status;
        this.message = message;
    }

    @Override
    public Integer getStatus() {
        return status;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
